package com.gemptc.birthdaydemonapp.utils;


	  
	import java.io.File;
import java.io.FileNotFoundException;  
import java.io.FileOutputStream;  
import java.io.IOException;
import java.io.OutputStream;  
	  


import java.util.UUID;

	import android.graphics.Bitmap;  
import android.graphics.Bitmap.CompressFormat;  
	  
	public class BitmapUtil {  
		
		public static void saveMyBitmap(String bitName,Bitmap mBitmap ) {
            File f = new File("/sdcard/Note/" + bitName+UUID.randomUUID().toString() + ".png");
            try {
				f.createNewFile();
			} catch (IOException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
            FileOutputStream fOut = null;
            try {
                    fOut = new FileOutputStream(f);
            } catch (FileNotFoundException e) {
                    e.printStackTrace();
            }
            mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);
            try {
                    fOut.flush();
            } catch (IOException e) {
                    e.printStackTrace();
            }
            try {
                    fOut.close();
            } catch (IOException e) {
                    e.printStackTrace();
            }
    }
	  
	}  


